import type { RouteRecordRaw } from "vue-router";
/**
 * 路由meta对象参数说明
 * meta: {
 *      title:          菜单栏及 tagsView 栏、菜单搜索名称（国际化）
 *      hidden：        是否隐藏此路由
 *      icon：          菜单、tagsView 图标，阿里：加 `iconfont xxx`，fontawesome：加 `fa xxx`
 * }
 */

/**
 * 静态路由（默认路由）
 */
export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "main",
    component: () => import("../view/index.vue"),
  },
  {
    path: "/mall",
    name: "mall",
    component: () => import("../view/mall.vue"),
  },
  {
    path: "/goods",
    name: "goods",
    component: () => import("../view/goods.vue"),
  },
  {
    path: "/detail",
    name: "detail",
    component: () => import("../components/Detail.vue"),
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../view/login/login.vue"),
  },
  {
    //我的订单
    path: "/order",
    component: () => import("../view/order.vue"),
  },
  {
    //我的收藏
    path: "/collect",
    component: () => import("../view/collect.vue"),
  },
  {
    //我的购物车
    path: "/shopping",
    name: "shopping",
    component: () => import("../view/Shopping.vue"),
  },
  {
    //结算
    path: "/settlement",
    name: "settlement",
    component: () => import("../view/settlement.vue"),
  },
  {
    path: "/404",
    name: "404",
    component: () => import("../view/error.vue"),
  },
  {
    path: "/:pathMatch(.*)",
    name: "error",
    redirect: "/404",
  },
];
